A tracing framework is a collection of software routines and tools that permit a user to instrument and record the activity of one or more executing programs, including an operating system kernel. Tracing frameworks typically permit users to describe instrumentation requests by naming one or more probes, which are locations of interest that can be used as data-recording sites within an instrumented program. Tracing frameworks also permit users to associate these probes with one or more actions. The actions describe what tracing operations should be performed when the executing instrumented program passes through the probe site (i.e., when a probe triggers). Tracing frameworks typically provide either a defined set of actions at each probe, a set of user-selectable actions, or the ability to execute an essentially arbitrary set of actions composed in a programming language (such as C, C++, or Pascal). In tracing frameworks that support a programming language for describing actions, language statements are compiled into an intermediate form or directly into machine code and are then executed when the probe triggers.
If the tracing framework permits instrumentation of the running operating system kernel itself, the instrumentation service takes the compiled intermediate form of the tracing request and loads it into the operating system kernel as part of enabling the corresponding instrumentation. The instrumentation code executes as part of the operating system kernel itself either directly on the processor or through a virtual machine or interpreter provided by the instrumentation service that executes inside the operating system kernel. Because the operating system is an essential service without which the computer system cannot function, a tracing framework for an operating system kernel makes provisions for safety, so an improperly constructed or maliciously designed tracing program cannot damage the operating system or deny service to users. If provisions for safety are not resolved, the tracing system cannot be usefully deployed in any environment where the operating system is shared between users or performs an important function.
Implementers of tracing frameworks typically ignore this problem and rely on the access control measures for the users (i.e., to only allow persons that are sufficiently privileged or knowledgeable on the system), or the implementers have implemented a variety of cumbersome mechanisms to enforce security of the compiled instrumentation.